home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Shareware
/
IDimager Personal 4.2.0.3
/
setup_IDimager_Personal_V4.exe
/
{app}
/
web
/
modules
/
labelimages.psc
< prev
next >
Wrap
Text File
|
2008-06-22
|
2KB
|
68 lines
%include uservalidate.inc %/include
%code
%include storeddata.inc %/include
%include resulttable.inc %/include
var
AItems: TCatalogItems;
AProp: TCatalogItemProp;
AParents: TCatalogItemProps;
i: Integer;
begin
if not FindStoredData ('dsITEMS', AItems, False) then
begin
AItems := TCatalogItems.Create (TCatalogItem, '');
StoreData ('dsITEMS', AItems);
end;
if AItems.GUID <> Request.Params.Values['GUID'] then
begin
AItems.Clear;
AItems.LastSort := csPhotoDate;
AItems.LastSortOrder := stDescending;
AProp := TCatalogItemProp.Create(nil);
AProp.GUID := Request.Params.Values['GUID'];
Catalog.EnumProp (AProp.GUID, AProp, False);
Catalog.EnumItemsForProp (AProp, AItems, True, vptAlbumDisplay);
AItems.Name := toWideString('');
AItems.GUID := Request.Params.Values['GUID'];
if Catalog.PropHasSubs (AProp) then
AItems.Name := AItems.Name +
{
'<a href="javascript: $(''popupMenu'').style.visibility = ''visible'';">' +
'<img src="%var:PageOffset/images/dropdown.png">' +
'</a>' +
' ' +
}
'';
AItems.Name := AItems.Name +
AProp.PropName +
'<span class="small"><br/>';
AParents := TCatalogItemProps.Create (TCatalogItemProp, '');
Catalog.EnumParentsForProp (AProp, AParents, False);
for i := 0 to AParents.Count - 1 do
begin
AItems.Name := AItems.Name +
iif(i > 0, ' | ', '') +
'<a href="javascript:getHTML(''%var:PageOffset/./modules/labelimages.psc'', ''' + AjaxContainer + ''', ''GUID=' + AParents.Items[i].GUID + ''')">' +
AParents.Items[i].PropName +
'</a>' +
'';
end;
AItems.Name := AItems.Name + '</span>';
AParents.Free;
AProp.Free;
end;
result := IncludeResultTable (AItems, 'dsITEMS', 1, 0, 0);
end;
%/code